<?php
/* @var $this EntryLogController */
/* @var $model EntryLog */

$this->breadcrumbs=array(
	'Entry Logs'=>array('index'),
	$model->entry->code,
);

require_once 'Mobile_Detect.php';
	
	

			$detect = new Mobile_Detect;
			
if ($detect->isMobile() ){
?>

<body style="background-image: url( http://i59.tinypic.com/35i0i0z.png )"> </body>


<?php

	$this->menu=array(
		
);
 
 } 
 
	else
 {
 }

$this->menu=array(
	array('label'=>'Show Entry', 'url'=>array('entry/view','id'=>$model->entry_id)),

	array('label'=>'List EntryLog', 'url'=>array('index')),
	//array('label'=>'Create EntryLog', 'url'=>array('create')),
//array('label'=>'Update EntryLog', 'url'=>array('update', 'id'=>$model->identry_status)),
	//array('label'=>'Delete EntryLog', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->identry_status),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage EntryLog', 'url'=>array('admin')),
);
?>
  
<h1>Entry Log for Entry:<?php echo $model->entry->code; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	
	'attributes'=>array(
		'date',
		array('label'=>'Description ', 'value'=>$model->description ,'type'  => 'raw', ),
		array('label'=>'Entry', 'value'=>$model->entry->code, ),
		array('label'=>'Employee', 'value'=>$model->employee->last_name.", ".$model->employee->first_name),
		
		//array('label'=>'Description', 'value'=>$model->status->description),
	),
)); ?>

<br>

<h1>Logs for Entry:<?php  echo $model->entry->code;?></h1>
<?php $el= EntryLog	::model()->findAll('entry_id = :a ORDER BY identry_status DESC', array(':a'=>$model->entry_id));?>
		<?php if (count($el) !== 0){
		$i = 0;
		?>

		
			
		<?php foreach ($el as $row) 
	{ ?>
	<h1><?php echo $row->date;?> </h2>
	<?php
	
		
			$this->widget('zii.widgets.CDetailView', array(
		'data'=>$row,
		'attributes'=>array(
		array('label'=>'Description ', 'value'=>$model->description ,'type'  => 'raw', ),
		array('label'=>'Entry', 'value'=>$model->entry->code),
		array('label'=>'Employee', 'value'=>$model->employee->last_name.", ".$model->employee->first_name),
		
		//array('label'=>'Description', 'value'=>$model->status->description),
		),
		
		));
		}
	}
	
?>
<br>
<br>